package com.alivehex.physensor5;

public class SensorCommand {
	
	//*********************************************
	//*				INPUT PACKAGES
	//*********************************************
	
	//* DataLength = 1
	//* Data[0] = Channel index
	public static final short PKG_ENABLE_TEMP = (short)0x0031;
	
	//* DataLength = 1;
	//* Data[0] = Channel index
	public static final short PKG_ENABLE_TIME	= (short)0x0032;
	
	//* DataLength = 0;
	public static final short PKG_ENABLE_GRAVITY = (short)0x0033;
	
	//* DataLength = 1;
	//* Data[1] = Gravity range
	public static final short PKG_SELECT_GRAVITY_RANGE	= (short)0x0034;
	
	//* DataLength = 2;
	//* Data[0] = Address
	//* Data[1] = Value
	public static final short PKG_WRITE_GRAVITY_REG = (short)0x0035;
	
	//* DataLength = 1;
	//* Data[0] = Address
	//* Value in RESULT Data
	public static final short PKG_READ_GRAVITY_REG	= (short)0x0036;
	
	//* DataLength = 1;
	//* Data[0] = Channel
	//* Data[1] = Sample period in Millisecond
	public static final short PKG_SET_SAMPLE_PERIOD	= (short)0x0037;
	
	//* DataLength = 1;
	//* Data[0] = FREQ = (MAX)0 ~ 7(MIN) 
	public static final short PKG_SET_GRAVITY_FREQ = (short)0x0038;
	
	//* DataLength = 1;
	//* Data[0] = Channel
	public static final short PKG_ENABLE_FREQ = (short)0x0039;
	
	//* Disable Command Mask
	public static final short PKG_DISABLE_MASK	= (short)0x8000;
	
	//*********************************************
	//*				OUTPUT PACKAGES
	//*********************************************
	
	//* DataLength = 4
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = Command Value
	//* Data[3] = Command result: Passed<0>, Failed<1>
	//* Data[n] = Extra Data * n
	public static final short PKG_COMMAND_RESULT = (short)0x0800;
	
	//* DataLength = 5
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = <MSB8bits> Sensor Type | <LSB8bits> ChannelIndex
	//*		  	  Digital<0> Analog<1>
	//* Data[3] = Temperature Value 1<Digital: Temp16, Analog: Volt1 
	//* Data[4] = Temperature Value 2<Digital: Dummy,  Analog: Volt2
	public static final short PKG_TEMP_DATA = (short)0x0041;
	
	//* DataLength = 3 
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = Channel index	
	public static final short PKG_TIME_DATA = (short)0x0042;
	
	//* DataLength = 5 
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = X-Axis value
	//* Data[3] = Y-Axis value
	//* Data[4] = Z-Axis value
	public static final short PKG_GRAVITY_DATA	= (short)0x0043;
	
	//* DataLength = 3 
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = Tick Count Value
	public static final short PKG_HEART_DATA = (short)0x0044;
	
	//* DataLength = 3 
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = Battery ADC Value
	public static final short PKG_BATTERY_DATA	= (short)0x0045;
	
	//* DataLength = 4 
	//* Data[0] = Time Mark LSB in MS
	//* Data[1] = Time Mark MSB in MS
	//* Data[2] = Frequency LSB
	//* Data[3] = Frequency MSB
	public static final short PKG_FREQ_DATA	 = (short)0x0046;
}
